/*******************************************************************************
*   			Impacts of a Large-Scale Parenting Program: 				   *
*					Experimental Evidence from Chile						   *
********************************************************************************


	REQUIRES:	"$dt_int/baseline_for figures.dta"
	CREATES:	${out_tables}/F2A_base_childbeh_caregiver.eps
				
	WRITEN BY:  Italo Lopez  [italolop@usc.edu]

********************************************************************************
	Prepare data
*******************************************************************************/

	* Load data
	use "$dt_int/baseline_for figures.dta", clear



/*******************************************************************************
*   Set macros for regressions
*******************************************************************************/
	
	* Var labels 
	
	* Plot settings 
	*--------------------------------- 
	set scheme white_tableau
	graph set window fontface "Times New Roman"
	global graph_pref "graphregion(color(white) margin(vsmall)) "

/*******************************************************************************
	Figure A2: Baseline child behavior and primary caregiver education
*******************************************************************************/


** CBCL vs Educ **
twoway (lowess Achenpunt_old pc_yrsch_old if inrange(edadtramos,1,6) ,lcolor(black)), /* 
*/ ytitle("CBCL score" ,  size(medium)) /*
*/ xtitle("Primary caregiver years of schooling" ,  size(medium)) /*
*/ xlabel(, valuelabel nogrid ) ylab(,nogrid) name(F2A_a, replace) /*
*/ title("a. Maladaptive Behaviors (CBCL) vs Caregiver Education", size(medlarge)) /*
*/ ytitle("CBCL Raw score")



** Battele vs Educ **
twoway (lowess pepebdisoc_old pc_yrsch_old if inrange(edadtramos,1,6) ,lcolor(black)), /*
*/ ytitle("Battelle score" ,  size(medium)) /*
*/ xtitle("Primary caregiver years of schooling" ,  size(medium)) /*
*/ xlabel(, valuelabel nogrid ) ylab(,nogrid)  name(F2A_b, replace)/*
*/ title("b. Adaptive Behaviors (Battelle) vs Caregiver Education", size(medlarge)) /*
*/ ytitle("Batelle raw score")

	graph combine F2A_a F2A_b, rows(1) xsize(7)
	gr export "$out_graphs/appendix/F2A_base_childbeh_caregiver.eps", replace
	gr export "$out_graphs/appendix/F2A_base_childbeh_caregiver.wmf", replace 
	gr export "$out_graphs/appendix/F2A_base_childbeh_caregiver.png", replace 

	
	

	
	